package com.huarui.payable.service;

import java.util.List;
import java.util.Map;
import org.ewaf.framework.model.ListModel;
import org.ewaf.framework.service.BaseService;
import com.huarui.payable.dao.IPayableDao;

public class PayableService extends BaseService {
	private IPayableDao getDao() {
		return (IPayableDao) dao;
	}

	@SuppressWarnings("unchecked")
	public List<Map> getPayableByConditions(ListModel lm, Map map) {
		if(lm!=null){
			Integer total = this.getDao().getByConditionsForCount(map);
			lm.setTotal(total);
			map.put("listModel", lm);
		}
		List<Map> result = getPayableByConditions(map);
		return result;
	}

	@SuppressWarnings("unchecked")
	public List<Map> getPayableByConditions(Map map) {
		List<Map> result = this.getDao().getByConditions(map);
		return result;
	}
}
